<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>

    <style>
      .box {
        padding: 50px;
        background-color: green;
        border: 1px solid #000;
      }
    </style>
  </head>
  <body>
    <!-- 
     -->
    <div id="app">
      <!-- 
        .lazy
        input => change
       -->
      <input type="text" v-model.lazy="msg" />
      <p>{{ msg }}</p>

      <!-- 
        .number
          会尝试将输入的内容转换成数字然后同步到数据
          内部使用 parseFloat, 能转换则转换，否则使用原值
       -->
      <input type="text" v-model.number="count" />

      <!-- 
        .trim
          会去除前后的空格
       -->
      <input type="text" v-model.trim="msg" />
      <p>{{ msg }}</p>
    </div>

    <script src="../lib/vue3.js"></script>
    <script>
      Vue.createApp({
        data() {
          return {
            msg: "hello",
            count: 1,
          };
        },
      }).mount("#app");
    </script>
  </body>
</html>
